<?php
/**
 * @package		Joomla.Site
 * @subpackage	com_users
 * @copyright	Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 * @since		1.6
 */

defined('_JEXEC') or die;

JHtml::_('behavior.keepalive');
//JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
?>
<script>
jQuery(function() {
	if (jQuery('#jformcountry_code').val() != ""){
		var countrycode = jQuery('#jformcountry_code').val();		
		jQuery("#countryList div select").removeClass('dropdown-box'); 
		jQuery("#categoryList div select").removeClass('dropdown-box');
		jQuery("#educationList div select").removeClass('dropdown-box'); 	
		jQuery.ajax({
             type: 'POST',
             url: "index.php?option=com_users&view=registration&layout=city&country_id="+countrycode,
             success: function(result) {
				if(result != "false") {
					jQuery("#vitualData").html(result);                      	              	              	        
					jQuery("#cityList").html(jQuery('#cityData').html());                	                                	
					jQuery("#vitualData").html("");   
            	} 
			}
       })
	}
	jQuery('.countryCode').change(function(){
		var countrycode = jQuery(this).val();
		jQuery("#countryList div select").removeClass('dropdown-box'); 
		jQuery("#categoryList div select").removeClass('dropdown-box');
		jQuery("#educationList div select").removeClass('dropdown-box'); 
		jQuery.ajax({
             type: 'POST',
             url: "index.php?option=com_users&view=registration&layout=city&country_id="+countrycode,
             success: function(result) {
				if(result != "false") {
					jQuery("#vitualData").html(result);                      	              	              	        
					jQuery("#cityList").html(jQuery('#cityData').html());                	                                	
					jQuery("#vitualData").html("");   
            	} 
			}
       })  
	});	
});
</script>
<div class="box-list">
			<div class="head-title">
				<h2><?php echo JText::_('Employer sign up'); ?></h2>
			</div>
            <div class="clear"></div>
			<form id="member-registration" name="registerform" action="<?php echo JRoute::_('index.php?option=com_users&task=registration.register'); ?>" method="post" class="form-validate">
		<table border="0" cellpadding="0" cellspacing="0" width="100%">
		<tr>
			<td valign="top" width="48%" style="background: #eeeeee">
				<h3 class="subtitle"><?php echo JText::_('Account info')?></h3>
				<table border="0" cellpadding="0" cellspacing="0" width="100%" style="padding: 10px 20px 20px 20px;">
				<tr height="50">
					<td>
						<div ><label title="" class="hasTip required" for="jform_firstname" id="jform_firstname-lbl"><?php echo JText::_('First name')?><span style="color: red">&nbsp;*</span></label></div>
						<div><input type="text" style="width: 290px" class="required invalid" value="" id="jform_firstname" name="jform[firstname]" aria-required="true" required="required" aria-invalid="true"></div>
					</td>
				</tr>
				<tr height="50">
					<td>
						<div ><label title="" class="hasTip required" for="jform_lastname" id="jform_lastname-lbl"><?php echo JText::_('Last name')?><span style="color: red">&nbsp;*</span></label></div>
						<div><input type="text" style="width: 290px" class="required invalid" value="" id="jform_lastname" name="jform[lastname]" aria-required="true" required="required" aria-invalid="true"></div>
					</td>
				</tr>
				<tr height="50">
					<td>
						<div ><label title="" class="hasTip required" for="jform_username" id="jform_username-lbl"><?php echo JText::_('Username')?><span style="color: red">&nbsp;*</span></label></div>
						<div><input type="text" style="width: 290px" class="validate-username required" value="" id="jform_username" name="jform[username]" aria-required="true" required="required"></div>
					</td>
				</tr>
				<tr height="50">
					<td>
						<div ><label title="" class="hasTip required" for="jform_email1" id="jform_email1-lbl"><?php echo JText::_('E-mail')?><span style="color: red">&nbsp;*</span></label></div>
						<div><input type="email" style="width: 290px" value="" id="jform_email1" class="validate-email required" name="jform[email1]" aria-required="true" required="required"></div>						
					</td>
				</tr>
				<tr height="50">
					<td>
						<div ><label title="" class="hasTip required" for="jform_email2" id="jform_email2-lbl"><?php echo JText::_('Re-enter E-mail')?><span style="color: red">&nbsp;*</span></label></div>
						<div><input type="email" style="width: 290px" value="" id="jform_email2" class="validate-email required" name="jform[email2]" aria-required="true" required="required"></div>
						<div style="color: #b1b1b1">A verification email will send to this E-mail address to verify validate your account</div>
					</td>
				</tr>
				<tr height="50">
					<td>
						<div ><label title="" class="hasTip required" for="jform_password1" id="jform_password1-lbl"><?php echo JText::_('Password')?><span style="color: red">&nbsp;*</span></label></div>
						<div><input type="password" style="width: 290px" class="validate-password required" autocomplete="off" value="" id="jform_password1" name="jform[password1]" aria-required="true" required="required"></div>
					</td>
				</tr>
				<tr height="50">
					<td>
						<div ><label title="" class="hasTip required" for="jform_password2" id="jform_password2-lbl"><?php echo JText::_('Re-enter password')?><span style="color: red">&nbsp;*</span></label></div>
						<div><input type="password" style="width: 290px" class="validate-password required" autocomplete="off" value="" id="jform_password2" name="jform[password2]" aria-required="true" required="required"></div>
					</td>
				</tr>
					
				</table>
			</td>
			<td>&nbsp;</td>
			<td valign="top" width="48%" style="background: #eeeeee">
				<h3 class="subtitle"><?php echo JText::_('Company info'); ?></h3>
				<table border="0" cellpadding="0" cellspacing="0" width="100%" style="padding: 10px 20px 20px 20px;">
				<tr height="50">
					<td>
						<div ><label title="" class="hasTip" for="jform_companyname" id="jform_companyname-lbl"><?php echo JText::_('Name')?><span style="color: red">&nbsp;*</span></label></div>
						<div><input type="text" style="width: 290px" value="" id="jform_companyname" name="jform[companyname]" aria-required="true" required="required"></div>
					</td>
				</tr>
				<tr height="50">
					<td>
						<div ><label title="" class="hasTip" for="jform_website" id="jform_website-lbl"><?php echo JText::_('Website')?></label></div>
						<div><input type="text" style="width: 290px" class="validate-website" value="" id="jform_website" name="jform[website]"></div>
					</td>
				</tr>
				<tr height="50">
					<td>
						<div ><label title="" class="hasTip" for="jform_contactemail" id="jform_contactemail-lbl"><?php echo JText::_('Email')?></label></div>
						<div><input type="text" style="width: 290px" class="validate-contactemail" value="" id="jform_contactemail" name="jform[contactemail]"></div>
					</td>
				</tr>
				<tr height="50">
					<td>
						<div ><label title="" class="hasTip" for="jform_country" id="jform_country-lbl"><?php echo JText::_('Country')?></label></div>
						<div id="countryList"><?php echo $this->countries;?></div>
					</td>
				</tr>
				<tr height="50">
					<td>
						<div ><label title="" class="hasTip required" for="jform_password2" id="jform_password2-lbl"><?php echo JText::_('City')?></label></div>
						<!--<div><input type="text" style="width: 290px" value="" id="city_id" name="jform[city_id]"></div>-->
						<div id="cityList"><?php echo $this->cities;?></div>
					</td>
				</tr>
				<tr height="50">
					<td>
						<div ><label title="" class="hasTip required" for="jform_password2" id="jform_password2-lbl"><?php echo JText::_('Address')?></label></div>						
						<div><textarea type="text" style="width: 290px" class="validate-address1" value="" id="jform_address1" name="jform[address1]"></textarea></div>
					</td>
				</tr>				
				</table>
			</td>			
		</tr>
		<tr>
			<td valign="top" style="padding-top: 20px">				
				<div><input type="checkbox" name="newsletter" value="1" />&nbsp;<?php echo JText::_('COM_USERS_I_WOULD_LIKE_ALSO_TO_SUBSCRIBE_TO_TST_NEWSLETTER');?></div>
				<div><input type="checkbox" name="privacy_policy" value="1" class="hasTip required" />&nbsp;<?php echo JText::_('COM_USERS_I_ACCEPT_THE_TERMS_OF_CONDITION_AND_PRIVACY_POLICY_OF_TST');?></div>				
			</td>
			<td></td>		
			<td valign="top">									
				<div style="padding-bottom: 10px;padding-top: 20px"><?php echo JText::_('COM_USERS_PLEASE_HELP_US_AVOIDING_SPAM');?></div>
				<?php $i=0;?>
				<?php foreach ($this->form->getFieldsets() as $fieldset): ?>
					<?php foreach ($this->form->getFieldset($fieldset->name) as $name => $field): ?>	
						<?php $i++;?>
						<?php if (sizeof($this->form->getFieldset($fieldset->name)) != $i) continue; ?>				
						<?php //echo $field->label; ?>
						<?php echo $field->input; ?>
					<?php endforeach; ?>	
				<?php endforeach; ?>
				<div style="padding-top:10px;"></div>
				<input class="button subbutton gradient-button" type="submit" name="submit" value="<?php echo JText::_('JREGISTER');?>" />
				<input class="button subbutton gradient-button" type="button" name="cancel" onclick="javascript:history.back(1);" value="<?php echo JText::_('JCANCEL');?>" />																		
			</td>
		</tr>
		</table>
		<div>	
			<div id="vitualData" style="display: none"></div>					
			<input type="hidden" name="option" value="com_users" />
			<input type="hidden" name="task" value="registration.register" />
			<input type="hidden" name="jform[users_type]" value="1" />
			<?php echo JHtml::_('form.token');?>
		</div>
		</form>	
</div>
<div style="height: 10px">&nbsp;</div>
